New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

choices.js

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

choices.js

A vanilla JS customisable text input/select box plugin

  • 9.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is choices.js?

Choices.js is a lightweight, configurable select box/text input plugin. It allows you to create customizable select boxes, text inputs, and tags input fields with ease. It provides a user-friendly interface for managing selections and input values.

What are choices.js's main functionalities?

Single Select

This feature allows you to create a single select dropdown where users can choose one option from a list. The `searchEnabled` option is set to false to disable the search functionality.

const choices = new Choices('#single-select', { searchEnabled: false });

Multiple Select

This feature allows you to create a multiple select dropdown where users can choose multiple options. The `removeItemButton` option adds a button to each selected item to allow users to remove it.

const choices = new Choices('#multiple-select', { removeItemButton: true });

Text Input

This feature allows you to create a text input field where users can add multiple tags separated by a delimiter. The `delimiter` option specifies the character used to separate tags.

const choices = new Choices('#text-input', { delimiter: ',' });

Predefined Choices

This feature allows you to initialize the select box or text input with predefined choices. The `items` option is used to specify the initial choices.

const choices = new Choices('#predefined-choices', { items: ['Choice 1', 'Choice 2', 'Choice 3'] });

Other packages similar to choices.js

Keywords

FAQs

Package last updated on 20 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc